import { request } from '@/utils/request';

import { loginParams, loginResp } from './model';

export function accountLogin(params: loginParams) {
  return request.post<loginResp>({
    url: `/platform/s/platform/login`,
    data: params,
  });
}

export function getPKey() {
  return request.get({
    url: `/platform/getpkey`,
  });
}

export function vCode() {
  return request.get(
    {
      url: '/platform/captcha/vcode',
      responseType: 'arraybuffer',
    },
    {
      isTransformResponse: false,
    },
  );
}
